#ifndef GAMEOBJECT_H
#define GAMEOBJECT_H

#include <system/application.h>
#include <maths/vector3.h>
#include <maths/math_utils.h>
#include <graphics/mesh.h>
#include <graphics/primitive.h>
#include <graphics/model.h>
#include <graphics/mesh_instance.h>
#include <system/platform.h>
#include <assets/obj_loader.h>
#include <graphics/mesh_instance.h>
#include <graphics/mesh.h>
#include "Meshes.h"

class GameObject : public abfw::MeshInstance{
public:
	GameObject();
	~GameObject();

	void Init(abfw::Mesh* mesh);

	//-- sets the GameObjects properties
	void SetTransform(abfw::Matrix44 transform);
	void SetVelocity(abfw::Vector3 velocity);
	void SetOrigin(abfw::Matrix44 origin);
	void SetLocalScale(abfw::Vector3 scale);
	void SetLocalTranslation(abfw::Vector3 translate);
	void SetLocalRotationX(float x);
	void SetLocalRotationY(float y);
	void SetLocalRotationZ(float z);

	//-- returns the GameObjects properties
	abfw::MeshInstance GetMeshInstance();
	abfw::Matrix44* GetLocalTransform();
	abfw::Vector3 GetVelocity();
	abfw::Matrix44 GetOrigin();
	abfw::Matrix44 GetLocalScale();
	abfw::Matrix44 GetLocalTranslation();
	abfw::Matrix44 GetLocalRotation();
	abfw::Model* GetModel();

	void Move();


private:


	abfw::Vector3 mVelocity;

	//-- model
	abfw::Model mModel;
	abfw::MeshInstance mInstance;

	//-- for transforms
	abfw::Matrix44 mRotationX;
	abfw::Matrix44 mRotationY;
	abfw::Matrix44 mRotationZ;

	abfw::Matrix44 mOrigin;
	abfw::Matrix44 mScale;
	abfw::Matrix44 mTranslation;

	abfw::Matrix44 mLocalTransform;


};

#endif